Class AbstractContainer

Summary

Fully Qualified Name: Laminas\Session\AbstractContainer
Extends: ArrayObject

Description

Session storage container

Allows for interacting with session storage in isolated containers, which may have their own expiries, or even expiries per key in the container. Additionally, expiries may be absolute TTLs or measured in "hops", which are based on how many times the key or container were accessed.

Methods

Name Description Defined By
__construct() Constructor AbstractContainer
__get() Returns the value at the specified key by reference ArrayObject
__isset() Returns whether the requested key exists ArrayObject
__set() Sets the value at the specified key to value ArrayObject
__unset() Unsets the value at the specified key ArrayObject
append() Appends the value ArrayObject
asort() Sort the entries by value ArrayObject
count() Get the number of public properties in the ArrayObject ArrayObject
exchangeArray() Exchange the current array with another array or object. AbstractContainer
getArrayCopy() Creates a copy of the specific container name AbstractContainer
getDefaultManager() Get the default ManagerInterface instance AbstractContainer
getFlags() Gets the behavior flags. ArrayObject
getIterator() Iterate over session container AbstractContainer
getIteratorClass() Gets the iterator classname for the ArrayObject. ArrayObject
getManager() Get manager instance AbstractContainer
getName() Get container name AbstractContainer
ksort() Sort the entries by key ArrayObject
natcasesort() Sort an array using a case insensitive "natural order" algorithm ArrayObject
natsort() Sort entries using a "natural order" algorithm ArrayObject
offsetExists() Determine if the key exists AbstractContainer
offsetGet() Retrieve a specific key in the container AbstractContainer
offsetSet() Store a value within the container AbstractContainer
offsetUnset() Unset a single key in the container AbstractContainer
serialize() Serialize an ArrayObject ArrayObject
setDefaultManager() Set the default ManagerInterface instance to use when none provided to constructor AbstractContainer
setExpirationHops() Set expiration hops for the container, a single key, or set of keys AbstractContainer
setExpirationSeconds() Set expiration TTL AbstractContainer
setFlags() Sets the behavior flags ArrayObject
setIteratorClass() Sets the iterator classname for the ArrayObject ArrayObject
uasort() Sort the entries with a user-defined comparison function and maintain key association ArrayObject
uksort() Sort the entries by keys using a user-defined comparison function ArrayObject
unserialize() Unserialize an ArrayObject ArrayObject

Method Details

__construct()

Constructor

Provide a name ('Default' if none provided) and a ManagerInterface instance.

Parameter Name Type Description
$name null|string
$manager \Manager

Returns:

__get()

Returns the value at the specified key by reference

Parameter Name Type Description
$key mixed

Returns: mixed

__isset()

Returns whether the requested key exists

Parameter Name Type Description
$key mixed

Returns: bool

__set()

Sets the value at the specified key to value

Parameter Name Type Description
$key mixed
$value mixed

Returns: void

__unset()

Unsets the value at the specified key

Parameter Name Type Description
$key mixed

Returns: void

append()

Appends the value

Parameter Name Type Description
$value mixed

Returns: void

asort()

Sort the entries by value

Returns: void

count()

Get the number of public properties in the ArrayObject

Returns: int

exchangeArray()

Exchange the current array with another array or object.

Parameter Name Type Description
$input array|object

Returns: array Returns the old array

getArrayCopy()

Creates a copy of the specific container name

Returns: array

getDefaultManager()

Get the default ManagerInterface instance

If none provided, instantiates one of type {@link $managerDefaultClass}

Returns: \Manager

getFlags()

Gets the behavior flags.

Returns: int

getIterator()

Iterate over session container

Returns: \Iterator

getIteratorClass()

Gets the iterator classname for the ArrayObject.

Returns: string

getManager()

Get manager instance

Returns: \Manager

getName()

Get container name

Returns: string

ksort()

Sort the entries by key

Returns: void

natcasesort()

Sort an array using a case insensitive "natural order" algorithm

Returns: void

natsort()

Sort entries using a "natural order" algorithm

Returns: void

offsetExists()

Determine if the key exists

Parameter Name Type Description
$key string

Returns: bool

offsetGet()

Retrieve a specific key in the container

Parameter Name Type Description
$key string

Returns: mixed

offsetSet()

Store a value within the container

Parameter Name Type Description
$key string
$value mixed

Returns: void

offsetUnset()

Unset a single key in the container

Parameter Name Type Description
$key string

Returns: void

serialize()

Serialize an ArrayObject

Returns: string

setDefaultManager()

Set the default ManagerInterface instance to use when none provided to constructor

Parameter Name Type Description
$manager \Manager

Returns: void

setExpirationHops()

Set expiration hops for the container, a single key, or set of keys

Parameter Name Type Description
$hops int
$vars null|string|array

Returns: \Container

setExpirationSeconds()

Set expiration TTL

Set the TTL for the entire container, a single key, or a set of keys.

Parameter Name Type Description
$ttl int TTL
$vars string|array|null

Returns: \Container

setFlags()

Sets the behavior flags

Parameter Name Type Description
$flags int

Returns: void

setIteratorClass()

Sets the iterator classname for the ArrayObject

Parameter Name Type Description
$class string

Returns: void

uasort()

Sort the entries with a user-defined comparison function and maintain key association

Parameter Name Type Description
$function callable

Returns: void

uksort()

Sort the entries by keys using a user-defined comparison function

Parameter Name Type Description
$function callable

Returns: void

unserialize()

Unserialize an ArrayObject

Parameter Name Type Description
$data string

Returns: void

Top